from fastapi import File, UploadFile, Form
from pydantic import BaseModel
from typing import Optional


class create_harp(BaseModel):
    harp_name: str = Form(...),
    harp_type: str = Form(...),
    harp_desc: str = Form(...),
    audio_url: UploadFile = File(...),
    is_bax: bool = Form(False)


class harp_update(BaseModel):
    id: int
    harp_name: str = Form(...),
    harp_type: str = Form(...),
    harp_desc: str = Form(...),
    audio_url: Optional[UploadFile] = File(None),
    is_bax: Optional[str] = Form("false")



#sozluk

class SozlukResponse(BaseModel):
    id: int
    harp_id: int
    sozluk_data_1: str
    sozluk_data_2: str
    sozluk_data_1_audio_url: Optional[str] = None
    sozluk_data_2_audio_url: Optional[str] = None

    class Config:
        orm_mode = True
